package com.insideClass.exceptions;

/**
 * @author 13699
 */
public class Switch {
    private boolean state=false;
    public boolean read(){
        return false;
    }
    public void on(){
        state=true;
        System.out.println(this);
    }
    public void off(){
        state=false;
        System.out.println(this);
    }

    @Override
    public String toString() {
        return state?"on":"off";
    }

}
